package main

import "fmt"

func main() {
	//var a[3] int
	//fmt.Println(a[0])
	//fmt.Println(a[len(a)- 1])
	//
	////var q [3]int = [3] int{0,1,2}
	//var r [3]int = [3]int{0,1}
	//fmt.Println(r[2])
	//q := [...]int{1,2}
	//fmt.Printf("%T\n", q)
	a := [2] int{1,2}
	b := [...]int{1,2}
	c := [2]int{1,3}
	fmt.Println(a==b, a==c, b==c)
	//d := [3]int{1,2}
	//fmt.Println(a==d)// 编译错误：无法比较 [2]int == [3]int

	var team [3]string
	team[0] = "hammer"
	team[1] = "soldier"
	team[2] = "mum"

	for k, v := range team {
		fmt.Println(k, v)
	}
}